package middleware

import (
	"gitee.com/csingo/cContext"
	"gitee.com/csingo/cLog"
	"github.com/gin-gonic/gin"
)

type HelloMiddleware struct{}

func (i *HelloMiddleware) MiddlewareName() (app, name string) {
	return "demo", "HelloMiddleware"
}

func (i *HelloMiddleware) Handler(ctx *gin.Context) {
	cContext.GetTraceId(ctx)
	cLog.WithContext(ctx, map[string]interface{}{
		"route": ctx.Request.RequestURI,
	}).Debug("")
}
